package com.example.library.model;

public class GroupRoom {
    private String roomNumber;
    private String status; // "空闲", "已预约"
    private String userId; // 预约用户的ID，如果是空闲状态则为null
    private int capacity; // 房间容纳人数

    public GroupRoom(String roomNumber, int capacity) {
        this.roomNumber = roomNumber;
        this.capacity = capacity;
        this.status = "空闲";
        this.userId = null;
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public boolean isAvailable() {
        return "空闲".equals(status);
    }

    public boolean isClosedForUse() {
        return "关闭使用".equals(status);
    }
} 